package com.dawan.sbjy.dao;

import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface UserDao {
    Map findUserById(String id);
    Map findByUsername(String username);
    String getPassword(String id);
    List findUserByOpenId(String openid);
    int insertUser(JSONObject user);
    String getSessionkey(String userid);
    int updateSessionkey(@Param("userid") String userid,@Param("sessionkey") String sessionkey);
    int updatePhone(@Param("userid") String userid,@Param("phone") String phone);
    HashMap findUserByPassword( String email);
    int registeuser(@Param("password") String password,@Param("email") String email);
    int emailregistelength(String email);
    int savecode(@Param("email") String email,@Param("code") String code);
    int emailmatchcode(@Param("email") String email,@Param("code") String code);
    int deleteemailcode(@Param("email") String email,@Param("code") String code);

}

